home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / dlgdsn41.zip / TCOLORTX.H < prev    next >
C/C++ Source or Header  |  1993-07-15  |  1KB  |  50 lines

  1. #if defined( Uses_TColoredText ) && !defined( __TColoredText )
  2. #define __TColoredText
  3.  
  4. class far TRect;
  5.  
  6. class TColoredText : public TStaticText
  7. {
  8.  
  9. public:
  10.  
  11.     TColoredText( const TRect& bounds, const char *aText, ushort attribute );
  12.  
  13.     virtual void draw();
  14.     virtual ushort getTheColor();
  15.  
  16. protected:
  17.  
  18.     ushort attr;
  19.  
  20. private:
  21.  
  22.     virtual const char *streamableName() const
  23.     { return name; }
  24.  
  25. protected:
  26.  
  27.     TColoredText( StreamableInit );
  28.     virtual void write( opstream& );
  29.     virtual void *read( ipstream& );
  30.  
  31. public:
  32.  
  33.     static const char * const near name;
  34.     static TStreamable *build();
  35.  
  36. };
  37.  
  38. inline ipstream& operator >> ( ipstream& is, TColoredText& cl )
  39.     { return is >> (TStreamable&)cl; }
  40. inline ipstream& operator >> ( ipstream& is, TColoredText*& cl )
  41.     { return is >> (void *&)cl; }
  42.  
  43. inline opstream& operator << ( opstream& os, TColoredText& cl )
  44.     { return os << (TStreamable&)cl; }
  45. inline opstream& operator << ( opstream& os, TColoredText* cl )
  46.     { return os << (TStreamable *)cl; }
  47.  
  48. #endif  // Uses_TColoredText
  49.  
  50.